

package com.kimo.shop.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.kimo.shop.bean.model.OrderSettlement;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

public interface OrderSettlementMapper extends BaseMapper<OrderSettlement> {

	void updateByOrderNumberAndUserId(@Param("orderSettlement") OrderSettlement orderSettlement);

	List<OrderSettlement> getSettlementsByPayNo(@Param("payNo") String payNo);

	void updateSettlementsByPayNo(@Param("outTradeNo") String outTradeNo, @Param("transactionId") String transactionId);

	int updateToPay(@Param("payNo") String payNo,@Param("bizPayNo") String bizPayNo, @Param("version") Integer version);


	/**
	 *  通过订单编号获取订单支付信息列表，并去掉有重复的订单支付数据
	 * @param orderNumbers 订单编号列表
	 * @return 订单支付信息
	 */
	List<OrderSettlement> listByOrderNumbers(@Param("orderNumbers") List<String> orderNumbers);

	/**
	 * 查询出微信支付并且为二维码支付的
	 * @return 订单支付信息
	 */
	List<OrderSettlement> listByPayTypeAndTime();


}
